package service.Imp;

import Dao.PersonalInfoDao;
import Dao.ValidateDao;
import modal.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.LoginService;

import javax.annotation.Resource;

/**
 * Created by Charlotte on 2017/8/22.
 */
@Service
@Transactional
public class LoginServiceImp implements LoginService {
    @Autowired
    ValidateDao validateDao;

    @Autowired
    PersonalInfoDao personalInfoDao;

    public String loginValidate(User user) {
        return validateDao.validateUser(user);
    }

    public User getOneUser(String username) {
      return   personalInfoDao.getOneUser(username);
    }


}
